<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>Docs For Class DMZ_CSV</title>
			<link rel="stylesheet" href="../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=utf-8'/>
		</head>
		<body>
			<div class="page-body">			
<h2 class="class-name">Class DMZ_CSV</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
															<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
						
					</div>
	<div class="info-box-body">
        		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">DMZ_CSV Class</p>
		<p class="notes">
			Located in <a class="field" href="_extensions---csv.php.html">/extensions/csv.php</a> (line <span class="field">23</span>)
		</p>
		
				
		<pre></pre>
	
			</div>
</div>




	<a name="sec-method-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Method Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
												<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
		</div>
		<div class="info-box-body">			
			<div class="method-summary">
																				
												<div class="method-definition">
											<span class="method-result">bool</span>
										<a href="#csv_export" title="details" class="method-name">csv_export</a>
											(<span class="var-type"><a href="../DataMapper/DataMapper.html">DataMapper</a></span>&nbsp;<span class="var-name">$object</span>, <span class="var-type">mixed</span>&nbsp;<span class="var-name">$filename</span>, [<span class="var-type">array</span>&nbsp;<span class="var-name">$fields</span> = <span class="var-default">''</span>], [<span class="var-type">bool</span>&nbsp;<span class="var-name">$include_header</span> = <span class="var-default">TRUE</span>])
									</div>
																<div class="method-definition">
											<span class="method-result">array</span>
										<a href="#csv_import" title="details" class="method-name">csv_import</a>
											(<span class="var-type"><a href="../DataMapper/DataMapper.html">DataMapper</a></span>&nbsp;<span class="var-name">$object</span>, <span class="var-type">mixed</span>&nbsp;<span class="var-name">$filename</span>, [<span class="var-type">array</span>&nbsp;<span class="var-name">$fields</span> = <span class="var-default">''</span>], [<span class="var-type">boolean</span>&nbsp;<span class="var-name">$header_row</span> = <span class="var-default">TRUE</span>], [<span class="var-type">mixed</span>&nbsp;<span class="var-name">$callback</span> = <span class="var-default">NULL</span>])
									</div>
								</div>
		</div>
	</div>		

	
	<a name="sec-methods"></a>
	<div class="info-box">
		<div class="info-box-title">Methods</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
																<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
						
		</div>
		<div class="info-box-body">
			<A NAME='method_detail'></A>

<a name="methodcsv_export" id="csv_export"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">csv_export</span> (line <span class="line-number">34</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Convert a DataMapper model into an associative array.</p>
	<ul class="tags">
				<li><span class="field">return:</span> TRUE on success, or FALSE on failure.</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">bool</span>
		<span class="method-name">
			csv_export
		</span>
					(<span class="var-type"><a href="../DataMapper/DataMapper.html">DataMapper</a></span>&nbsp;<span class="var-name">$object</span>, <span class="var-type">mixed</span>&nbsp;<span class="var-name">$filename</span>, [<span class="var-type">array</span>&nbsp;<span class="var-name">$fields</span> = <span class="var-default">''</span>], [<span class="var-type">bool</span>&nbsp;<span class="var-name">$include_header</span> = <span class="var-default">TRUE</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type"><a href="../DataMapper/DataMapper.html">DataMapper</a></span>
				<span class="var-name">$object</span><span class="var-description">: The DataMapper Object to export</span>			</li>
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$fields</span><span class="var-description">: Array of fields to include.  If empty, includes all database columns.</span>			</li>
					<li>
				<span class="var-type">bool</span>
				<span class="var-name">$include_header</span><span class="var-description">: If FALSE the header is not exported with the CSV. Not recommended if planning to import this data.</span>			</li>
					<li>
				<span class="var-type">mixed</span>
				<span class="var-name">$filename</span><span class="var-description">: filename The filename to export to, or a file pointer. If this is a file pointer, it will not be closed.</span>			</li>
				</ul>
		
			
	</div>
<a name="methodcsv_import" id="csv_import"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">csv_import</span> (line <span class="line-number">108</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Import objects from a CSV file.</p>
<p class="description"><p>Completely empty rows are automatically skipped, as are rows that  start with a # sign (assumed to be comments).</p></p>
	<ul class="tags">
				<li><span class="field">return:</span> Array of imported objects, or FALSE if unable to import.</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">array</span>
		<span class="method-name">
			csv_import
		</span>
					(<span class="var-type"><a href="../DataMapper/DataMapper.html">DataMapper</a></span>&nbsp;<span class="var-name">$object</span>, <span class="var-type">mixed</span>&nbsp;<span class="var-name">$filename</span>, [<span class="var-type">array</span>&nbsp;<span class="var-name">$fields</span> = <span class="var-default">''</span>], [<span class="var-type">boolean</span>&nbsp;<span class="var-name">$header_row</span> = <span class="var-default">TRUE</span>], [<span class="var-type">mixed</span>&nbsp;<span class="var-name">$callback</span> = <span class="var-default">NULL</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type"><a href="../DataMapper/DataMapper.html">DataMapper</a></span>
				<span class="var-name">$object</span><span class="var-description">: The type of DataMapper Object to import</span>			</li>
					<li>
				<span class="var-type">mixed</span>
				<span class="var-name">$filename</span><span class="var-description">: Name of CSV file, or a file pointer.</span>			</li>
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$fields</span><span class="var-description">: If empty, the database fields are used.  Otherwise used to limit what fields are saved.</span>			</li>
					<li>
				<span class="var-type">boolean</span>
				<span class="var-name">$header_row</span><span class="var-description">: If true, the first line is assumed to be a header row.  Defaults to true.</span>			</li>
					<li>
				<span class="var-type">mixed</span>
				<span class="var-name">$callback</span><span class="var-description">: A callback method for each row.  Can return FALSE on failure to save, or 'stop' to stop the import.</span>			</li>
				</ul>
		
			
	</div>
						
		</div>
	</div>


	<p class="notes" id="credit">
		Documentation generated on Fri, 13 Sep 2013 12:32:34 +0200 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.4</a>
	</p>
	</div></body>
</html>